home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- BorderStyle = 3 'Fixed Dialog
- Caption = "ODBC Toy"
- ClientHeight = 6435
- ClientLeft = 1140
- ClientTop = 1785
- ClientWidth = 9435
- Height = 7185
- Icon = "ODBC1.frx":0000
- Left = 1050
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 6435
- ScaleWidth = 9435
- ShowInTaskbar = 0 'False
- Top = 1125
- Width = 9615
- Begin VB.Frame Frame2
- Caption = "Sheet Formatting"
- Height = 2475
- Left = 7320
- TabIndex = 6
- Top = 3840
- Width = 1995
- Begin VB.TextBox txtNumSheets
- Height = 285
- Left = 1020
- TabIndex = 14
- Text = "4"
- Top = 1080
- Width = 675
- End
- Begin VB.TextBox txtNumCols
- Height = 285
- Left = 1020
- TabIndex = 13
- Text = "256"
- Top = 720
- Width = 675
- End
- Begin VB.TextBox txtNumRows
- Height = 285
- Left = 1020
- TabIndex = 12
- Text = "16384"
- Top = 360
- Width = 675
- End
- Begin VB.CommandButton cmdInitTable
- Caption = "Init Sheet"
- Height = 315
- Left = 360
- TabIndex = 11
- Top = 1980
- Width = 1335
- End
- Begin VB.CommandButton cmdSetFormats
- Caption = "Set Formats"
- Height = 315
- Left = 360
- TabIndex = 10
- Top = 1560
- Width = 1335
- End
- Begin VB.Label Label3
- Alignment = 1 'Right Justify
- Caption = "Sheets = "
- Height = 255
- Left = 180
- TabIndex = 9
- Top = 1140
- Width = 795
- End
- Begin VB.Label Label2
- Alignment = 1 'Right Justify
- Caption = "Cols = "
- Height = 255
- Left = 180
- TabIndex = 8
- Top = 780
- Width = 795
- End
- Begin VB.Label Label1
- Alignment = 1 'Right Justify
- Caption = "Rows = "
- Height = 255
- Left = 180
- TabIndex = 7
- Top = 420
- Width = 795
- End
- End
- Begin VB.Frame Frame1
- Caption = "Query Options"
- Height = 2475
- Left = 120
- TabIndex = 1
- Top = 3840
- Width = 6975
- Begin VB.Frame Frame3
- Caption = "Query"
- Height = 1995
- Left = 1980
- TabIndex = 17
- Top = 300
- Width = 4815
- Begin VB.ComboBox cboQueries
- Enabled = 0 'False
- Height = 300
- ItemData = "ODBC1.frx":044A
- Left = 480
- List = "ODBC1.frx":045A
- TabIndex = 18
- Text = "Select * From Authors"
- Top = 960
- Width = 4155
- End
- Begin Threed.SSOption optUseQuery
- Height = 195
- Left = 240
- TabIndex = 20
- Top = 660
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 344
- _StockProps = 78
- Caption = "Use Query:"
- End
- Begin Threed.SSOption optShowDialog
- Height = 195
- Left = 240
- TabIndex = 19
- Top = 360
- Width = 1215
- _Version = 65536
- _ExtentX = 2143
- _ExtentY = 344
- _StockProps = 78
- Caption = "Show Dialog"
- Value = -1 'True
- End
- End
- Begin VB.TextBox txtStartRow
- Height = 285
- Left = 180
- TabIndex = 16
- Text = "1"
- Top = 1560
- Width = 615
- End
- Begin VB.TextBox txtStartCol
- Height = 285
- Left = 180
- TabIndex = 15
- Text = "1"
- Top = 1920
- Width = 615
- End
- Begin VB.Label Label5
- Caption = "Start Col"
- Height = 255
- Left = 900
- TabIndex = 22
- Top = 1920
- Width = 735
- End
- Begin VB.Label Label4
- Caption = "Start Row"
- Height = 195
- Left = 900
- TabIndex = 21
- Top = 1620
- Width = 735
- End
- Begin Threed.SSCheck chkSetMaxRC
- Height = 195
- Left = 180
- TabIndex = 5
- Top = 1260
- Width = 1575
- _Version = 65536
- _ExtentX = 2778
- _ExtentY = 344
- _StockProps = 78
- Caption = "Set Max Row/Col"
- Value = -1 'True
- End
- Begin Threed.SSCheck chkSetColWidths
- Height = 195
- Left = 180
- TabIndex = 4
- Top = 960
- Width = 1575
- _Version = 65536
- _ExtentX = 2778
- _ExtentY = 344
- _StockProps = 78
- Caption = "Set Col Widths"
- Value = -1 'True
- End
- Begin Threed.SSCheck chkSetColFormats
- Height = 195
- Left = 180
- TabIndex = 3
- Top = 660
- Width = 1575
- _Version = 65536
- _ExtentX = 2778
- _ExtentY = 344
- _StockProps = 78
- Caption = "Set Col Formats"
- Value = -1 'True
- End
- Begin Threed.SSCheck chkSetColNames
- Height = 195
- Left = 180
- TabIndex = 2
- Top = 360
- Width = 1575
- _Version = 65536
- _ExtentX = 2778
- _ExtentY = 344
- _StockProps = 78
- Caption = "Set Col Names"
- Value = -1 'True
- End
- End
- Begin VCIF1Lib.F1Book F1Book1
- Height = 3555
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 9195
- _version = 65536
- _extentx = 16219
- _extenty = 6271
- _stockprops = 96
- borderstyle = 1
- appname = ""
- filename = "ODBC1.frx":04C3
- End
- Begin VB.Menu mnuConnect
- Caption = "Connect!"
- End
- Begin VB.Menu mnuFetch
- Caption = "Fetch!"
- End
- Begin VB.Menu mnuDisconnect
- Caption = "Disconnect!"
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub cmdInitTable_Click()
- ' This will kill a connection with the existing table
- F1Book1.InitTable
- End Sub
- Private Sub cmdSetFormats_Click()
- On Error GoTo OptionsError
- F1Book1.MaxRow = Val(txtNumRows.Text)
- F1Book1.MaxCol = Val(txtNumCols.Text)
- F1Book1.NumSheets = Val(txtNumSheets.Text)
- Exit Sub
- OptionsError:
- MsgBox Error
- End Sub
- Private Sub mnuConnect_Click()
- On Error GoTo ConnectError
- Dim returnCode%, pConnect$
- F1Book1.ODBCConnect pConnect, True, returnCode
- Exit Sub
- ConnectError:
- MsgBox Error
- End Sub
- Private Sub mnuDisconnect_Click()
- F1Book1.ODBCDisconnect
- End Sub
- Private Sub mnuFetch_Click()
- On Error GoTo FetchError
- Dim returnCode%, query$
- Dim setColNames As Boolean, setColFormats As Boolean
- Dim setColWidths As Boolean, setMaxRC As Boolean
- Let query = cboQueries.Text
- setColNames = chkSetColNames.Value
- setColFormats = chkSetColFormats.Value
- setColWidths = chkSetColWidths.Value
- setMaxRC = chkSetMaxRC.Value
- F1Book1.ODBCQuery query, Val(txtStartRow.Text), Val(txtStartCol.Text), _
- optShowDialog.Value, setColNames, setColFormats, setColWidths, setMaxRC, returnCode
- Exit Sub
- FetchError:
- MsgBox Error
- End Sub
- Private Sub optUseQuery_Click(Value As Integer)
- ' User will be prompted for query if dialog shown
- cboQueries.Enabled = Value
- End Sub
- Private Sub optShowDialog_Click(Value As Integer)
- ' User will be prompted for query if dialog shown
- cboQueries.Enabled = Not Value
- End Sub
-